1
'*************************** Module Header ******************************'
2 ' Module Name: HTMLEventHandler.vb
3 ' Project: VBBrowserHelperObject
4 ' Copyright (c) Microsoft Corporation.
6 ' This ComVisible class HTMLEventHandler can be assign to the event properties
7 ' of DispHTMLDocument interfaces, like oncontextmenu, onclick and so on. It can
8 ' also be used in other HTMLElements.
11 ' This source is subject to the Microsoft Public License.
12 ' See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
13 ' All other rights reserved.
15 ' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
16 ' EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
17 ' WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
18 '*************************************************************************'
20 Imports System
.Runtime
.InteropServices
22 ' The delegate of the handler method.
23 Public Delegate
Sub HtmlEvent(ByVal e
As mshtml
.IHTMLEventObj
)
26 Public Class HTMLEventHandler
28 Private htmlDocument
As mshtml
.HTMLDocument
30 Public Event eventHandler
As HtmlEvent
32 Public Sub New(ByVal htmlDocument
As mshtml
.HTMLDocument
)
33 Me.htmlDocument
= htmlDocument
37 Public Sub FireEvent()
38 RaiseEvent eventHandler(Me.htmlDocument
.parentWindow
.event)